package com.atguigu.guli.service.edu.controller;

import com.atguigu.guli.service.edu.feign.OssFileService;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * @author jack
 * date 2024-07-02 13:33
 */
@Controller
@RequestMapping("/admin/oss/file")
public class LocalFileController {

    @Resource
    private OssFileService ossFileService;
    @GetMapping("/getImage/{id}/{fileName}")
    public ResponseEntity<Object> getImage(@PathVariable("id") Long id,
                                           @PathVariable("fileName") String fileName) {

        return ossFileService.getImage(id, fileName);
    }
}
